|
Umístění Menu |
---|
Draft → BSpline |
Pracovní stoly |
Kreslení, Architektura |
Výchozí zástupce |
B S |
Představen ve verzi |
- |
Viz také |
Drát |
Nástroj B-křivka vytváří B-křivku z několika bodů v aktuální pracovní rovině. Přebírá tloušťku čáry a barvu předtím nastavenou v záložce nástrojů. Nástroj B-křivka se chová přesně stejně jako nástroj Drát.
The Draft BSpline command specifies the exact points through which the curve will pass. The Draft BezCurve and the Draft CubicBezCurve commands, on the other hand, use control points to define the position and curvature of the spline.
See also: Draft Tray, Draft Snap and Draft Constrain.
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 1.0).
See also: Property editor.
A Draft BSpline object is derived from a Part Part2DObject and inherits all its properties. It also has the following additional properties:
Draft
Area
): (read-only) specifies the area of the face of the spline. The value will be 0.0
if ÚdajeMake Face if false
or the face cannot be created.Bool
): specifies if the spline is closed or not. If the spline is initially open this value is false
, setting it to true
will draw a curve segment to close the spline. If the spline is initially closed this value is true
, setting it to false
will remove the last curve segment and make the spline open.Bool
): specifies if the spline makes a face or not. If it is true
a face is created, otherwise only the perimeter is considered part of the object. This property only works if ÚdajeClosed is true
and if the spline does not self-intersect.Float
): affects the shape of the spline.VectorList
): specifies the points of the spline in its local coordinate system.Draft
Length
): specifies the size of the symbol displayed at the end of the spline.Enumeration
): specifies the type of symbol displayed at the end of the spline, which can be Dot
, Circle
, Arrow
, Tick
or Tick-2
.Bool
): specifies whether to show a symbol at the end of the spline, so it can be used as an annotation line.Enumeration
): specifies the Draft Pattern with which to fill the face of the closed spline. This property only works if ÚdajeMake Face is true
and if PohledDisplay Mode is Flat Lines
.Float
): specifies the size of the Draft Pattern.Nástroj B-křivka může být využit v makrech a z konzoly Pythonu použitím následující funkce:
To create a Draft BSpline use the make_bspline
method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeBSpline
method.
bspline = make_bspline(pointslist, closed=False, placement=None, face=None, support=None)
bspline = make_bspline(Part.Wire, closed=False, placement=None, face=None, support=None)
Příklad:
import FreeCAD as App
import Draft
doc = App.newDocument()
p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 1000, 0)
p3 = App.Vector(2000, 0, 0)
spline1 = Draft.make_bspline([p1, p2, p3], closed=False)
spline2 = Draft.make_bspline([p1, 2*p3, 1.3*p2], closed=False)
spline3 = Draft.make_bspline([1.3*p3, p1, -1.7*p2], closed=False)
doc.recompute()